﻿<%@ Page Title="" Language="C#" MasterPageFile="~/default-interno.master" AutoEventWireup="true" CodeBehind="loja.aspx.cs" Inherits="CeA.Reports.Atendimento.Web.admin.loja" %>
<%@ Register Assembly="CeA.Reports.Atendimento.Web" Namespace="CeA.Reports.Atendimento.Web.ServerControls" TagPrefix="cea" %>

<%@ Register src="../inc/WebControls/MenuInterno.ascx" tagname="MenuInterno" tagprefix="menu" %>
<%@ Register src="../inc/WebControls/PesquisaRfs.ascx" tagname="PesquisaRfs" tagprefix="search" %>
<%@ Register src="../inc/WebControls/PesquisaRegiao.ascx" tagname="PesquisaRegiao" tagprefix="search" %>
<%@ Register src="../inc/WebControls/PesquisaEspecialista.ascx" tagname="PesquisaEspecialista" tagprefix="search" %>
<%@ Register src="../inc/WebControls/MessageBox.ascx" tagname="MessageBox" tagprefix="msgbox" %>

<asp:Content ID="head" ContentPlaceHolderID="head" runat="server">
  <link rel="Stylesheet" href="/css/popup.css" type="text/css" />
</asp:Content>

<asp:Content ID="body" ContentPlaceHolderID="FilterContentPlaceholder" runat="server">
  <h2 id="form_title" runat="server">Dados da Loja</h2>
  <table cellpadding="1" cellspacing="1">
    <tr>
      <td style="width:80px;"><label for="txtSigla">Sigla</label> </td>
      <td><asp:TextBox ID="txtSigla" runat="server" CssClass="text-field" Width="225px" MaxLength="40"/></td>
    </tr>
    <tr>
      <td><label for="txtNome">Nome</label> </td>
      <td><asp:TextBox ID="txtNome" runat="server" CssClass="text-field" Width="550px" MaxLength="100"/></td>
    </tr>
    <tr>
      <td><label for="txtRfs"  class="label">RFS</label></td>      
      <td>
        <asp:TextBox ID="txtRfs" runat="server" CssClass="text-field" MaxLength="128" ReadOnly="true" Width="325px"  />
        <asp:Button ID="cmdPesquisarRfs" runat="server" CssClass="search-buttom" CausesValidation="false" />
      </td>
    </tr>
    
    <tr>
      <td><label for="txtRegiao" class="label">Regi&atilde;o</label></td>      
      <td style="width:auto">
        <asp:TextBox ID="txtRegiao" runat="server" CssClass="text-field" MaxLength="128" ReadOnly="true" Width="325px" />
        <asp:Button ID="cmdPesquisarRegiao" runat="server" CssClass="search-buttom" CausesValidation="false" />
      </td>
    </tr>
    
    <tr>
      <td><label for="txtEspecilista" class="label">Especialista</label></td>      
      <td style="width:auto">
        <asp:TextBox ID="txtEspecialista" runat="server" CssClass="text-field" MaxLength="128" ReadOnly="true" Width="325px" />
        <asp:Button ID="cmdPesquisarEspecialista" runat="server" CssClass="search-buttom" CausesValidation="false" />
      </td>
    </tr>
  </table>
  
  <span class="break">
    <asp:Button ID="cmdPesquisar" runat="server" CssClass="form-buttom" Text="Pesquisar" />
    <asp:Button ID="cmdLimpar"    runat="server" CssClass="form-buttom" Text="Limpar" />
  </span>
  
  <br />
  
  <!-- DataList Header Hack -->
  <div id="gridHeader" runat="server" visible="false" style="margin:0 1px 0 1px;">
    <table cellpadding="0" cellspacing="0" border="0" style="width:100%">
      <tr>
        <td colspan="8">
          <h2>Lista de Lojas</h2>
        </td>
      </tr>
      <tr class="th">
        <td style="width: 021px">&nbsp        </td>
        <td style="width: 080px">RFS          </td>
        <td style="width: 080px">Sigla        </td>
        <td style="width: 030px">UF           </td>
        <td style="width: 120px">Cidade       </td>
        <td style="width: 120px">Região       </td>
        <td style="width: 120px">Especialista </td>
        <td style="width:  auto">Nome         </td>
      </tr>
    </table>
  </div>
  
  <div id="gridScroll" runat="server" visible="false" style="overflow-x:auto; height:190px">
    <asp:DataList ID="dataList" runat="server" Width="100%" CellSpacing="1" CellPadding="0">
      <ItemStyle CssClass="cor-1" />
      <AlternatingItemStyle CssClass="cor-2" />
      <ItemTemplate>
        <table cellpadding="0" cellspacing="0" style="width:100%;table-layout:fixed;" border="0">
          <tr class="list-row">
            <td style="width: 021px">
              <cea:GroupRadioButton ID="rbtItem" runat="server" GroupName="rfsid" Text='<%#DataBinder.Eval(Container.DataItem, "Id")%>' />
            </td>
            <td style="width: 080px"><%#DataBinder.Eval(Container.DataItem, "Rfs.Nome")%></td>
            <td style="width: 080px">
              <asp:LinkButton id="sel" runat="server" CommandName="VIEW" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "Id")%>' 
                CssClass="link-buttom" ToolTip="Clique aqui para visualizar." Text='<%#DataBinder.Eval(Container.DataItem, "Sigla")%>' />
            </td>
            <td style="width: 030px"><%#DataBinder.Eval(Container.DataItem, "UF")               %></td>
            <td style="width: 120px"><%#DataBinder.Eval(Container.DataItem, "Cidade")           %></td>
            <td style="width: 120px"><%#DataBinder.Eval(Container.DataItem, "Regiao.Nome")      %></td>
            <td style="width: 120px">
              <span style="display:block; width:110px;overflow:hidden;white-space:nowrap;" title='<%#DataBinder.Eval(Container.DataItem, "Especialista.Nome")%>'>
                <%#DataBinder.Eval(Container.DataItem, "Especialista.Nome")%>
              </span>
            </td>
            <td style="width:  auto"><%#DataBinder.Eval(Container.DataItem, "Nome")             %></td>
          </tr>
        </table>
      </ItemTemplate>
    </asp:DataList>
  </div>
  
  <span id="editControls" runat="server" class="break" visible="false">
    <asp:Button ID="cmdPlanejar" runat="server" CssClass="form-buttom" Text="Planejar" onclick="cmdPlanejar_Click" Visible="false" />
    <asp:Button ID="cmdPlanExec" runat="server" CssClass="form-buttom" Text="Visualizar" onclick="cmdPlanExec_Click" Visible="false" />
    
    <asp:Button ID="cmdEditar"   runat="server" CssClass="form-buttom" Text="Editar"   onclick="cmdEditar_Click"  />
    <asp:Button ID="cmdExcluir"  runat="server" CssClass="form-buttom" Text="Excluir"  onclick="cmdExcluir_Click" />
  </span>


  <search:PesquisaRfs ID="pesquisaRfs" runat="server" />
  <search:PesquisaRegiao ID="pesquisaRegiao" runat="server" />
  <search:PesquisaEspecialista ID="pesquisaEspecialista" runat="server" />
  
  <msgbox:MessageBox ID="MessageBox" runat="server" />
  
</asp:Content>

<asp:Content ID="menu" ContentPlaceHolderID="MenuInternoPlaceholder" runat="server">
  <menu:MenuInterno ID="menuInterno" runat="server" Titulo="Aç&otilde;es" />
</asp:Content>
